/* 精英杂志自定义样式 */

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #f8f9fa;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  line-height: 1.7;
  color: var(--text-color);
}

/* 导航栏 */
.navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: white !important;
}

.nav-link {
  color: rgba(255,255,255,0.8) !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: white !important;
}

/* 文章卡片 */
.card {
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* 付费墙 */
.paywall {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem;
  border-radius: 15px;
  text-align: center;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.paywall h5 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.paywall p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.paywall .btn-primary {
  background: var(--accent-color);
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.paywall .btn-primary:hover {
  background: #c0392b;
  transform: scale(1.05);
}

/* 邀请码提示 */
.invite-required {
  background: var(--accent-color);
  color: white !important;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* 文章页面 */
article h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

article .text-muted {
  font-size: 0.95rem;
  margin-bottom: 2rem;
  color: #6c757d;
}

article .content {
  font-size: 1.1rem;
  line-height: 1.8;
}

article .content h2, article .content h3 {
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

article .content p {
  margin-bottom: 1.5rem;
}

/* 管理后台 */
.admin-panel {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  padding: 2rem;
  margin-bottom: 2rem;
}

.admin-panel h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* 按钮样式 */
.btn-outline-primary {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  article h1 {
    font-size: 2rem;
  }
  
  .paywall {
    padding: 2rem;
    margin: 1rem 0;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
}

/* 阅读进度条 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  z-index: 9999;
  transition: width 0.3s ease;
}

/* 代码块样式 */
pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
}

code {
  color: var(--accent-color);
  background: rgba(231, 76, 60, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* 引用样式 */
blockquote {
  border-left: 4px solid var(--secondary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #666;
  background: rgba(52, 152, 219, 0.05);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin: 1.5rem 0;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

th {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

tr:hover {
  background: rgba(52, 152, 219, 0.05);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 成功提示 */
.alert-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
  border: none;
  color: white;
  border-radius: 10px;
  padding: 1rem 1.5rem;
}

/* 错误提示 */
.alert-danger {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  border: none;
  color: white;
  border-radius: 10px;
  padding: 1rem 1.5rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}